<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cenの客栈</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css">
</head>
<body>

<!--导航-->
<nav th:fragment="menu(n)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <a href="#"><h2 class="ui teal header item" th:text="${session.topTitle}">Cenの客栈</h2></a>
            <a href="#" th:href="@{/}" class="m-item item m-mobile-hide " th:classappend="${n==1} ? 'active'"><i
                    class="star icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i
                    class=" list icon"></i>分类</a>
            <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><i
                    class=" tags icon"></i>标签</a>
            <a href="#" th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><i
                    class=" calendar alternate outline icon"></i>时间轴</a>
            <a href="#" th:href="@{/picture}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i
                    class="heart icon"></i>照片墙</a>
            <a href="#" th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==6} ? 'active'"><i
                    class="smile outline icon"></i>关于Cen</a>
            <div class="right m-item item m-mobile-hide">
                <!-- <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                     <div class="ui icon inverted transparent input m-margin-tb-tiny">
                         <input type="text" name="query" placeholder="搜索...." th:value="${query}">
                         <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                     </div>
                 </form>-->
                <a href="/admin" target="_blank" style="width:100px; text-align:center"><i
                        class="hand point right outline icon"></i>&nbsp;Cenの后台</a>
            </div>
        </div>
    </div>
</nav>

<!--中间内容-->
<div class="m-container m-padded-tb-big animated fadeIn">

    <div class="ui container">
        <div class="ui stackable grid">
            <!--左边博客列表-->
            <div class="eleven wide column">

                <!--左侧统计区域-->
                <div class="ui top attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui teal header"><i class="list ol icon"></i>文章列表</h3>
                        </div>
                        <div class="right aligned column">
                            一共有 <h2 class="ui orange header m-inline-block m-text-thin"
                                    th:text="${page.totalElements}"></h2> 篇
                        </div>
                    </div>
                </div>

                <!--左侧博客列表-->
                <div class="ui attached  segment">

                    <div class="ui padded vertical segment m-padded-tb-large" th:each="blog : ${page.content}">
                        <div class="ui middle aligned mobile reversed stackable grid">
                            <div class="eleven wide column">
                                <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"
                                                         class="m-black" th:text="${blog.title}">这篇文章真是太精彩了！！！</a></h3>
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black"><p
                                        th:text="|${blog.description}......|">如此如此，这般这般</p></a>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img src="https://unsplash.it/100/100?image=1005"
                                                     th:src="@{${blog.user.avatar}}" alt="" class="ui avatar image">
                                                <div class="content"><a th:href="@{/about}" target="_blank"
                                                                        class="header"
                                                                        th:text="${blog.user.nickname}"></a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i><span
                                                    th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}"></span>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> <span th:text="${blog.views}"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" target="_blank"
                                           class="ui teal basic label m-padded-tiny m-text-thin"
                                           th:text="${blog.type.name}"></a>
                                    </div>
                                </div>
                            </div>

                            <div class="five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img src="https://unsplash.it/800/450?image=1005" th:src="@{${blog.firstPicture}}"
                                         class="ui rounded image">
                                </a>
                            </div>

                        </div>
                    </div>

                </div>

                <!--左侧底部分页区域-->
                <div class="ui bottom attached segment" th:if="${page.totalPages}>1">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}"
                               class="ui mini teal basic button">往上翻</a>
                        </div>
                        <div class="right aligned column">
                            <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}"
                               class="ui mini teal basic button">往下翻</a>
                        </div>
                    </div>
                </div>

            </div>

            <!--右侧区域-->
            <div class="five wide column">

                <!--分类-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <h3><i class="bars icon"></i>文章分类</h3>
                            </div>
                            <div class="right aligned column">
                                <a href="#" th:href="@{types/-1}" target="_blank"><h4>更多<i
                                        class="angle double right icon"></i></h4></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <div class="ui fluid vertical menu">
                            <a href="#" th:href="@{/types/{id}(id=${type.id})}" target="_blank" class="item"
                               th:each="type : ${types}">
                                <span th:text="${type.name}">学习日志</span>
                                <div class="ui teal basic left pointing label" th:text="${#arrays.length(type.blogs)}">
                                    13
                                </div>
                            </a>

                        </div>
                    </div>
                </div>

                <!--标签-->
                <div class="ui segments m-margin-top-large">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <h3><i class="tags icon"></i>文章标签</h3>
                            </div>
                            <div class="right aligned column">
                                <a href="#" th:href="@{tags/-1}" target="_blank"><h4>更多<i
                                        class="angle double right icon"></i></h4></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <a href="#" th:href="@{/tags/{id}(id=${tag.id})}" target="_blank"
                           class="ui teal basic left pointing label m-margin-tb-tiny" th:each="tag : ${tags}">
                            <span th:text="${tag.name}">如何发财</span>
                            <div class="detail" th:text="${#arrays.length(tag.blogs)}">23</div>
                        </a>

                    </div>
                </div>

                <!--最新推荐-->
                <div class="ui segments m-margin-top-large">
                    <div class="ui secondary segment ">
                        <h3><i class="bookmark icon"></i>最新文章</h3>
                    </div>
                    <div class="ui segment" th:each="blog : ${recommendBlogs}">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="m-black m-text-thin"
                           th:text="${blog.title}">奥特曼打小怪兽</a>
                    </div>
                </div>

                <br><br><br>
                <!--吐槽区域-->
                <div class="me-margin-top-large">
                    <div class="ui horizontal header divider ">
                        人生若只如初见~
                    </div>
                    <div class="ui card centered" style="width: 11em">
                        <a target="_blank" href="#">
                            <img th:src="@{images/wechat.png}" src="../static/images/wechat.png" title="你好鸭~"
                                 class="ui rounded image">
                        </a>
                    </div>
                </div>


            </div>

        </div>
    </div>

</div>

<br>
<br>
<!--底部footer-->
<footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-tb-massive">


</footer>

<script type="text/javascript" charset="utf-8"
        src="https://files.cnblogs.com/files/liuzhou1/L2Dwidget.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="https://files.cnblogs.com/files/liuzhou1/L2Dwidget.min.js"></script>

<script type="text/javascript">
    L2Dwidget.init({
        "display": {
            "superSample": 2,
            "width": 200,
            "height": 400,
            "position": "right",
            "hOffset": 0,
            "vOffset": 0
        }
    });
</script>


<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<!--/*/</th:block>/*/-->

<!--鼠标点击效果-->
<!--<script type="text/javascript">
    var a_idx = 0;jQuery(document).ready(function($) {$("body").click(function(e) {var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善", "社会主义好", "永远跟党走", "First Blood", "Double Kill", "Triple Kill", "Quadra Kill"
    , "Penta Kill");var $i = $("<span/>").text(a[a_idx]);
        a_idx = (a_idx + 1) % a.length;var x = e.pageX,y = e.pageY;$i.css({"z-index": 100000000,"top": y - 20,"left": x,"position": "absolute","font-weight": "bold","color": "#ef5b40"});$("body").append($i);$i.animate({"top": y - 180,"opacity": 0},1500,function() {$i.remove();});});});
</script>-->


<script>

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

</script>


</body>
</html>